翻訳と辞書
Words near each other
・ Argument from nonbelief
・ Argument from poor design
・ Argument from queerness
・ Argument from reason
・ Argument from religious experience
・ Argument from silence
・ Argument in the alternative
・ Argument map
・ Argument of a function
・ Argument of latitude
・ Argument of periapsis
・ Argument principle
・ Argument shift method
・ Argument to moderation
・ Argument-deduction-proof distinctions
Argument-dependent name lookup
・ Argumental
・ Argumentation and Advocacy
・ Argumentation and Debate
・ Argumentation ethics
・ Argumentation framework
・ Argumentation theory
・ Argumentative
・ Argumentative dialogue
・ Argumentative turn
・ Arguments for and against drug prohibition
・ Arguments for eternity
・ Argumentum a contrario
・ Argumentum ad baculum
・ Argumentum ad captandum


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Argument-dependent name lookup : ウィキペディア英語版
Argument-dependent name lookup

In the C++ programming language, argument-dependent lookup (ADL), or argument-dependent name lookup, applies to the lookup of an unqualified function name depending on the types of the arguments given to the function call. This behavior is also known as Koenig lookup, as it is often attributed to Andrew Koenig, though he is not its inventor.〔(【引用サイトリンク】 title=A Personal Note About Argument-Dependent Lookup )
During argument-dependent lookup, other namespaces not considered during normal lookup may be searched where the set of namespaces to be searched depends on the types of the function arguments. Specifically, the set of declarations discovered during the ADL process, and considered for resolution of the function name, is the union of the declarations found by normal lookup with the declarations found by looking in the set of namespaces associated with the types of the function arguments.
== Example ==
An example of ADL looks like this:

namespace NS
}
int main()

A common pattern in the C++ Standard Library is to declare overloaded operators that will be found in this manner. For example, this simple Hello World program would not compile if it weren't for ADL:

#include
#include
int main()

Using << is equivalent to calling operator<< without the std:: qualifier. However, in this case, the overload of operator<< that works for string is in the std namespace, so ADL is required for it to be used.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Argument-dependent name lookup」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.